# -*- conding:UTF-8 -*-

'''
@ Project: p616
@ File: utils.py
@ Author: 程腾达
@ Date：2022/6/22 19:30

'''
# JWT_RESPONSE_PAYLOAD_HANDLER
# def jwt_response_payload_handler(token,user,request,*args,**kwargs):
#     return {
#         'uid':user.id,
#         'username':user.username,
#         'token':token
#     }
# from django.contrib.auth.backends import ModelBackend
# from .models import User
# from django.contrib.auth.hashers import check_password # 对密码哈系加密
#
# class Myapp(ModelBackend):
#     def user_can_authenticate(self,request, username=None ,password=None ,**kwargs):
#         user =User.objects.filter(username=username,is_staff=True,is_active=True)
#         if user and check_password(password,user.password):
#             return user
#         return None

# from ronglian_sms_sdk import SmsSDK
# import json
